package com.sky.mapper;

import com.sky.entity.DishFlavor;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface DishFlavorMapper {

    /**
     * 新增菜品口味
     * @param flavors
     */
    void insertDishFlavor(List<DishFlavor> flavors);

    /**
     * 根据dishId查询菜品口味
     * @param id
     */
    List<DishFlavor> getDishFlavorBydishId(Integer id);

    /**
     * 根据id删除
     * @param id
     */
    @Delete("delete from dish_flavor where dish_id = #{id}")
    void deleteById(Integer id);

}
